class Sounds
  def Sounds.[](name)
    @@sounds = Hash.new unless defined?(@@sounds)
    @@sounds[name] ||= Gosu::Sample.new($game, name)
  end
end

class Images
  def Images.add(window, name)
    @@images = Hash.new unless defined?(@@images)
    @@images[name] = Gosu::Image.new(window, name)
  end
  
  def Images.[](name)
    @@images = Hash.new unless defined?(@@images)
    @@images[name] ||= Gosu::Image.new($game, name)
  end
end

class Anims
  def Anims.add(window, name, w, h, mode = false)
    @@images = Hash.new unless defined?(@@images)
    @@images[name] = Gosu::Image.load_tiles(window, name, w, h, mode)
  end
  def Anims.[](name)
    @@images[name]
  end
end
